extends Node2D
@onready var animated_sprite_2d = $AnimatedSprite2D
@onready var animation_player = $AnimationPlayer

signal restart_button_pressed
func _ready() -> void:
	hide()
	set_process_input(false)



func show_loading() -> void:
	show()
	GR.is_rebirth = 1
	animated_sprite_2d.play("loading")
	animation_player.play("loading")
	await get_tree().create_timer(1.0).timeout
	GR.is_rebirth = 0
	hide()

func show_loading_end() -> void:
	show()
	GR.is_rebirth = 1
	animation_player.play("loading_end")
	await get_tree().create_timer(1.0).timeout
	GR.is_rebirth = 0
	hide()
